package mv.releaser.controler;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import mv.releaser.model.MvReleaser;
import mv.releaser.view.MainWindowJFormD;

public class LoadConfiguration {

	private ConfigObject		config;
	private MainWindowJFormD	view;
	private MvReleaser			mvReleaser;

	public LoadConfiguration(ConfigObject config, MvReleaser mvReleaser,
			MainWindowJFormD view) {
		this.view = view;
		this.config = config;
		this.mvReleaser = mvReleaser;
		setConfig();
	}

	private void setConfig() {
		view.setGenreModel(config.getGenreModel());
		view.setTypeModel(config.getTypeModel());
		view.setAudioModel(config.getAudioModel());
		view.setSourceModel(config.getSourceModel());
		view.setLanguageModel(config.getLanguageModel());
		view.setDeinterlaceModel(config.getDeinterlaceModel());
		view.setFormatModel(config.getFormatModel());
		view.setRipperModel(config.getRipperModel());
		view.setGroupModel(config.getGroupModel());

		mvReleaser.setLastSavePath(config.getLastSavePath());
		mvReleaser.setLastOpenPath(config.getLastOpenPath());
	}
}
